﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "GmFamilyUtils.h"
#include <vector>

namespace gcmp
{
    class IDocument;
    class ElementId;
}

namespace gfam
{

    class IFamilyConstraint;

    /// \brief 高亮工具类。
    class GM_FAMILY_UTILS_EXPORT FamilyHighlightUtils
    {
    public:

        static void HighlightConstraints(gcmp::IDocument* pDoc, std::set<const IFamilyConstraint*>& failedConstraints,
            const IFamilyConstraint* pNotShowConstraint, bool addRefrenceObject = false);

        /// \brief 高亮约束解算的特征组
        /// \param pDoc 文档
        /// \param pFailedFeatureGroup 特征组
        /// \note 由于会改变元素可见性，所以高亮后还需要提交事务
        static void HighlightFeatureGroup(gcmp::IDocument *pDoc, const std::set<gcmp::ElementId> &failedFeatureGroup);
    };
}